<?php

$fontend_settings = array(
    'defaultController' => 'index',
    'components' => array(
        'urlManager' => array(
            'class' => 'MyUrlManager',
            'showScriptName' => false,
            //'matchValue' => true,
            'urlFormat' => 'path',
            'rules' => array(
                '/' => 'index/index',
                'login' => 'account/login',
                'logout' => 'account/logout',
                'register' => 'account/register',       
                'rss' => 'search/rss',
                
                //1. trang search theo keyword 3. danh sach cac job cua 1 cty
                '<kw:.*>-jobs' => 'search/keyword',
                //2. search theo keyword + location
                '<kw:.*>-jobs-in-<lname:.*>' => 'search/keywordlocation',                                
                //4. trang job cua 1 chuyen muc
                'jobs-cat-<cat:[a-zA-Z0-9]+>-<alias:.*?>' => 'search/cate',
                //5. job theo 1 location nao day
                'jobs-in-<lname:.*>' => 'search/location',
                
                //search all
                'j' => 'search/result',
                
                
                'job/redirect/<id:[a-zA-Z0-9]+>/<b:[a-zA-Z0-9]+>' => array('job/redirect', 'append'=> false, 'parsingOnly' => true),
                'job/redirect/<id:[a-zA-Z0-9]+>' => 'job/redirect',                                
                'mail-alert/<id:[a-zA-Z0-9\=]+>/<act:[a-zA-Z0-9]+>' => 'ajax/mailalert',
                'job/<alias:.*?>-<id:[a-zA-Z0-9]+>' => array('job/detail', 'urlSuffix' => '.html'),
                'job/redirect/<id:[a-zA-Z0-9]+>' => 'job/redirect',
                'static/<alias:.*?>' => array('about/detail', 'urlSuffix' => '.html'),
                '<controller>' => '<controller>',
                '<controller>/<action>' => '<controller>/<action>',
            ),
        )
    )
);
return CMap::mergeArray(require(dirname(__FILE__) . '/main.php'), $fontend_settings);